# Maintainer: Thomas Aldrian <aldrian.thom@proton.me>
pkgname=plots
pkgver=0.7.0
pkgrel=0
pkgdesc="A graph plotting app for GNOME"
url="https://github.com/alexhuntley/Plots"
arch="noarch"
license="GPL-3.0-or-later"
# >=0.8.0 requires adwaita & gtk4 instead of libhandy & gtk3
depends="
	freeglut
	gtk+3.0
	libhandy1
	py3-freetype-py
	py3-gobject3
	py3-jinja2
	py3-lark-parser
	py3-numpy
	py3-opengl
	py3-pyglm
	"
makedepends="py3-setuptools"
checkdepends="py3-pytest mesa-osmesa"
source="$pkgname-$pkgver.tar.gz::https://github.com/alexhuntley/Plots/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/Plots-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# Required for headless
	export PYOPENGL_PLATFORM="osmesa"
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
d72576873b728ab4d02375462912c970f1c52524e80bd0690d79c04b117af7d9d60f150dc29f70ac198074aa338e21eef94cf8d28e9062540401564de3a4b88b  plots-0.7.0.tar.gz
"
